import time

from Commen import project_path, Types_operations
from Commen.log_logger import MyLog
from Commen.play_voice import play_music

my_log = MyLog()


def voice_playback():
    for i in range(50):
        time.sleep(5)
        # play_music(file_name=project_path.xh)
        # my_log.info(Types_operations.Music + '-' + Types_operations.Awaken + '-播放了唤醒语音')
        # time.sleep(8)
        play_music(file_name=project_path.get_up)
        my_log.info(Types_operations.Music + '-' + Types_operations.Get_up + '-播放了起床语音')
        time.sleep(10)
        # Event(driver).event()
        play_music(file_name=project_path.sleep)
        my_log.info(Types_operations.Music + '-' + Types_operations.Sleep + '-播放了睡觉语音')
        time.sleep(10)
        play_music(file_name=project_path.weather)
        my_log.info(Types_operations.Music + '-' + Types_operations.Weather + '-播放了天气')
        time.sleep(16)
        play_music(file_name=project_path.traditional_opera)
        my_log.info(Types_operations.Music + '-' + Types_operations.Traditional + '-播放了戏曲')
        time.sleep(120)
        play_music(file_name=project_path.radio_broadcast)
        my_log.info(Types_operations.Music + '-' + Types_operations.Radio_broadcast + '-播放了广播')
        time.sleep(10)
        play_music(file_name=project_path.headache)
        my_log.info(Types_operations.Music + '-' + Types_operations.Health_Lecture + '-播放了健康讲座')
        time.sleep(180)
        play_music(file_name=project_path.god)
        my_log.info(Types_operations.Music + '-' + Types_operations.Search_business + '-播放了封神榜')
        time.sleep(60)
        play_music(file_name=project_path.egg)
        my_log.info(Types_operations.Music + '-' + Types_operations.Egg + '-播放了番茄炒蛋')
        time.sleep(60)
        play_music(file_name=project_path.unrecognizable)
        my_log.info(Types_operations.Music + '-' + Types_operations.Distinguish + '-播放了无法识别语音')
        time.sleep(30)
        play_music(file_name=project_path.speak)
        my_log.info(Types_operations.Music + '-' + Types_operations.Speak + '-播放了未说话语音')
        time.sleep(30)
